#ifndef __FUN_H_
#define __FUN_H_

GROUP * alloc_one_node();
GROUP * create_linked();
GROUP * linked_end(GROUP * head);
GROUP * add_new_group(GROUP * head, char * name);
GROUP * sel_one_group(GROUP * head, char * str);
GROUP * del_one_group(GROUP * load);
GROUP * read_file_to_linked(GROUP * head);
GROUP * save_linked_to_file(GROUP * head);
GROUP * bubble_sort_group(GROUP * head, int len);

LXR * alloc_one_people();
LXR * creat_people_list();
LXR * list_end(LXR * head);
LXR * add_new_people(LXR * head, char * name, char * newPhoneNum);
LXR * sel_one_people(LXR * head, char * str);
LXR * bubble_sort_people(LXR * head, int len);

int main_menu();
int lxr_menu();
void menu_funG(GROUP * head, int choise);
int menu_funX(GROUP * head, GROUP * nload, int choise);
int isSameG(GROUP * head, char * name);
int isSameL(LXR * head, char * newPhoneNum);
int is_check_phoneNum(char * str);
int get_group_length(GROUP * head);
int get_people_length(LXR * head);

void print_one_group(GROUP * load);
void print_one_people(LXR * load);
void print_all_group(GROUP * head);
void print_all_people(LXR * head);
void del_one_people(LXR * head, char * str);
void modify_one_group(GROUP * head, char * str, char * newstr);
void modify_one_people(LXR * pload, char * name);
void move_group(GROUP * oload, GROUP * nload);

char isSure();

#endif